import pytest

from api.ihrm_emploee_api import IhrmEmploeeApi
from common.assert_util import common_assert, common_put, common_delete, common_select
from config import IHRM_EMP_PUT_JSON_DATA_PATH, IHRM_EMP_DELETE_JSON_DATA_PATH, IHRM_EMP_SELECT_JSON_DATA_PATH
from common.get_json_util import read_json_data


class TestIhrmEmploeeselect:

    @pytest.mark.parametrize("status_code,success,code,message", read_json_data(IHRM_EMP_SELECT_JSON_DATA_PATH))
    def test_ihrm_emploee_select(self, status_code, success, code, message):
        # 发送员工删除接口请求
        emp_select_resp = IhrmEmploeeApi.ihrm_emploee_select_api()
        # 断言
        common_select(emp_select_resp, status_code, success, code, message)


if __name__ == '__main__':
    pytest.main(["-s", "testihrm.py"])
